gpsbabel.git
5 years agotidy modernize-deprecated-headers
tsteven4 [Fri, 29 Jan 2021 14:51:20 +0000 (07:51 -0700)]
tidy modernize-deprecated-headers

5 years agoMerge pull request #673 from tsteven4/tidyupagain
tsteven4 [Thu, 28 Jan 2021 20:58:58 +0000 (13:58 -0700)]
Merge pull request #673 from tsteven4/tidyupagain

clang tidy readability fixes

5 years agotidy readability-qualified-auto
tsteven4 [Thu, 28 Jan 2021 18:08:14 +0000 (11:08 -0700)]
tidy readability-qualified-auto

I also ran these through astyle with our astylerc file to match
our standard.  This resulted in significant reformatting in geojson.cc

5 years agotidy readability-const-return-type
tsteven4 [Thu, 28 Jan 2021 16:18:37 +0000 (09:18 -0700)]
tidy readability-const-return-type

with a little whitespace cleanup by hand and removal of an
unused deprecated function.

5 years agotidy readability-convert-member-functions-to-static
tsteven4 [Thu, 28 Jan 2021 15:37:13 +0000 (08:37 -0700)]
tidy readability-convert-member-functions-to-static

this took a little bit of hand editing for whitespace and
one change that had to be reverted wrt a Functor signature.

5 years agotrust Qt to strip out characters illegal in xml. (#671)
tsteven4 [Wed, 27 Jan 2021 23:09:30 +0000 (16:09 -0700)]
trust Qt to strip out characters illegal in xml. (#671)

this was added in Qt 5.11.0.

5 years agoclang tidy readability-make-member-function-const
tsteven4 [Wed, 27 Jan 2021 19:18:06 +0000 (12:18 -0700)]
clang tidy readability-make-member-function-const

5 years agoUpdate standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)
tsteven4 [Wed, 27 Jan 2021 19:01:41 +0000 (12:01 -0700)]
Update standards to c++17, Qt >= 5.12, MSVC >= 2017 (#670)

* raise minimum standards to c++17, Qt 5.12, MSVC 2017.

* avoid std::optional::value which didn't work until macOS 10.14.

* avoid std::optional::value which didn't work until macOS 10.14.

* update runner for codeql so we have Qt >= 5.12

* try harder to get codeql working with newer Qt.

* use c++17 fallthrough attribute.

* use c++17 'if constexpr' as suggested by resharper.

* catch mkicondoc up with c++17

5 years agocleanup CMakeLists.txt a bit. (#669)
tsteven4 [Tue, 26 Jan 2021 18:55:59 +0000 (11:55 -0700)]
cleanup CMakeLists.txt a bit. (#669)

add support for cmake, ninja to Docker images.
get git to ignore various generated files.

5 years agofix some codeql warnings. (#663)
tsteven4 [Tue, 26 Jan 2021 17:58:32 +0000 (10:58 -0700)]
fix some codeql warnings. (#663)

* fix some codeql warnings.

* use c++11 z length modifier in format strings with size_t format arguments.

* don't attempt to upload coverage if token is null or not set.

with the github action flow the CODACY_PROJECT_TOKEN is set and null
for foreign pull requests that don't have access to the secrets.

* double protect token

5 years agoadd github actions for CI. (#662)
tsteven4 [Tue, 26 Jan 2021 13:42:40 +0000 (06:42 -0700)]
add github actions for CI. (#662)

* add github actions for CI.

* fix shellcheck issues in ci_install_windows.sh

* generalize windows ci build support

cleanup powershell scripts with Invoke-ScriptAnalyzer, including use of
"-Settings CodeFormatting".

create staging directory for windows installer creation.
It is difficult to exclude all the files in the build directory that we don't
want to distribute as the files are a function of the build system.

add windows cmake build.

5 years agocatch windows installer up with renamed vc redistributable installer. (#667)
tsteven4 [Sat, 23 Jan 2021 04:22:55 +0000 (21:22 -0700)]
catch windows installer up with renamed vc redistributable installer. (#667)

5 years agocatch cmake up (#666)
tsteven4 [Wed, 20 Jan 2021 16:51:45 +0000 (09:51 -0700)]
catch cmake up (#666)

with recent changes to *.pro files, and
some lost changes to get windows rc files working.

5 years agoMerge pull request #660 from gpsbabel/win64_only
tsteven4 [Thu, 31 Dec 2020 15:21:53 +0000 (08:21 -0700)]
Merge pull request #660 from gpsbabel/win64_only

switch windows release build from 32 bit to 64 bit (only).

5 years agoMerge pull request #658 from gpsbabel/date_demo
Robert Lipe [Wed, 30 Dec 2020 18:46:42 +0000 (12:46 -0600)]
Merge pull request #658 from gpsbabel/date_demo

Modernize time handling in compegps, globalsat, hiketech, jtr, magpro…

5 years agoMerge pull request #657 from gpsbabel/improve-errors
Robert Lipe [Tue, 29 Dec 2020 21:03:36 +0000 (15:03 -0600)]
Merge pull request #657 from gpsbabel/improve-errors

Improve errors by displaying full filename paths on open failures.

5 years agoturn off selected msvc warnings for c compiler.
tsteven4 [Tue, 29 Dec 2020 20:31:54 +0000 (13:31 -0700)]
turn off selected msvc warnings for c compiler.

5 years agoswitch windows release build from 32 bit to 64 bit (only).
tsteven4 [Tue, 29 Dec 2020 19:09:10 +0000 (12:09 -0700)]
switch windows release build from 32 bit to 64 bit (only).

5 years agoModernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.
Robert Lipe [Sun, 27 Dec 2020 09:13:10 +0000 (03:13 -0600)]
Modernize time handling in compegps, globalsat, hiketech, jtr, magproto, util.

5 years agoUnfix warning in util.cc since it breaks builds
Robert Lipe [Sun, 27 Dec 2020 06:19:41 +0000 (00:19 -0600)]
Unfix warning in util.cc since it breaks builds

...on Windows and I don't feel like wrangling in an upgrade.

5 years agoFix a dumb warning in garmin_txt.cc.
Robert Lipe [Sun, 27 Dec 2020 05:23:27 +0000 (23:23 -0600)]
Fix a dumb warning in garmin_txt.cc.

5 years agoUse full path name when displaying errors opening files for reads and writes.
Robert Lipe [Sun, 27 Dec 2020 05:15:06 +0000 (23:15 -0600)]
Use full path name when displaying errors opening files for reads and writes.

This doesn't work for every place where we issue fatal errors, but it gets
the high value formats.

5 years agoMerge pull request #647 from gpsbabel/robertlipe-patch-1
tsteven4 [Mon, 21 Dec 2020 15:18:41 +0000 (08:18 -0700)]
Merge pull request #647 from gpsbabel/robertlipe-patch-1

ozi: don't deinit a write stream if we don't have one.

5 years agoadd ozi track write test cases
tsteven4 [Sun, 20 Dec 2020 19:46:01 +0000 (12:46 -0700)]
add ozi track write test cases

5 years agobackward compatible changes for Qt6 (#656)
tsteven4 [Tue, 15 Dec 2020 21:37:55 +0000 (14:37 -0700)]
backward compatible changes for Qt6 (#656)

* Avoid implicit conversion of int to QChar.

In Qt6 the constructor QChar(int code) is explicit by default.

* update codacy coverage reporter

* move coverage generation to focal.

* use binary codacy coverage reporter

5 years agomove Qt 5.15 build to 5.15.2. (#652)
tsteven4 [Fri, 20 Nov 2020 23:37:41 +0000 (16:37 -0700)]
move Qt 5.15 build to 5.15.2. (#652)

5 years agoupdate mac, linux docker qtio builds to 5.12.10. (#650)
tsteven4 [Tue, 10 Nov 2020 20:31:00 +0000 (13:31 -0700)]
update mac, linux docker qtio builds to 5.12.10. (#650)

* update mac Qt 5.12 build to 5.12.10.

* update qtio docker build to qt 5.12.10

5 years agofix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)
tsteven4 [Sun, 8 Nov 2020 17:51:41 +0000 (10:51 -0700)]
fix "Mismatching new/free or malloc/delete" found by CodeQL. (#649)

5 years agoCreate codeql-analysis.yml (#648)
tsteven4 [Sun, 8 Nov 2020 16:26:23 +0000 (09:26 -0700)]
Create codeql-analysis.yml (#648)

* Create codeql-analysis.yml

* Update codeql-analysis.yml

5 years agoozi: don't deinit a write stream if we don't have one.
Robert Lipe [Tue, 27 Oct 2020 08:28:03 +0000 (03:28 -0500)]
ozi: don't deinit a write stream if we don't have one.

We can get into close() with a null stream_ TextStream. I think it has to do with ozi_openfile() reopening a file with a new name to match an extension of a certain type so it's renaming a file that hasn't been written. See issue #646

5 years agoupdate build to Qt 5.15.1 from 5.15.0 (#642)
tsteven4 [Thu, 10 Sep 2020 16:52:03 +0000 (10:52 -0600)]
update build to Qt 5.15.1 from 5.15.0 (#642)

5 years agoeliminate duplicate ignrando test. (#641)
tsteven4 [Tue, 8 Sep 2020 16:32:45 +0000 (10:32 -0600)]
eliminate duplicate ignrando test. (#641)

5 years agobackward compatible changes for Qt6. (#640)
tsteven4 [Sun, 30 Aug 2020 20:26:54 +0000 (14:26 -0600)]
backward compatible changes for Qt6. (#640)

* backward compatible changes for Qt6.

This is mostly QRegExp -> QRegularExpression.
Some QRegExp usage was was replaced by QString::trimmed.
There is also a QNetworkRequest redirect attribute change that is backward
compatible to Qt5.9.

* eliminate usage of unnecessary regular expressions.

* bring serial_unix into Qt6 compliance.

QSet::toList is gone, QSet::values is identical.
qSort is deprecated.

5 years agoadd ability to disable map preview in GUI (#635)
tsteven4 [Sat, 29 Aug 2020 19:37:14 +0000 (13:37 -0600)]
add ability to disable map preview in GUI (#635)

* add CONFIG option to disable map preview feature.

* additional excludes for disabled map preview

5 years agoFix potential segmentation faults with exif. (#639)
tsteven4 [Fri, 28 Aug 2020 11:50:07 +0000 (05:50 -0600)]
Fix potential segmentation faults with exif. (#639)

1. A pointer exif_app_ to an ExifApp on QList<ExifApp> exif_apps was saved.
After this the list was modified.  This can lead to the saved pointer becoming
invalid.
2. The ExifApp structure had a dtor, but no other special functions, i.e.  it
violated the rule of 3 and the rule of 5.  Operations on QList<ExifApp> may
cause an ExifApp on the list to be copied or destroyed.  If an ExifApp is
destroyed, then the ExifApp dtor would close the files, even though there could
be a copy of the ExifApp expecting the files still to be open.

This scenerio occured with Qt6, causing segmentation faults in exif.test.

5 years agofix hiketech datetime bug, prepare for toTime_t override (#638)
tsteven4 [Thu, 27 Aug 2020 18:05:37 +0000 (12:05 -0600)]
fix hiketech datetime bug, prepare for toTime_t override (#638)

* correct hiketech written time values.

the mystery previously noted in the code was due to the use of the %I format
specifier which prints out the hour using a 12 hour clock.

note that it is easy to see the times in the reference files were wrong.  the
times in the first reference file, expertgpx.gpx, are in UTC.  This is always
true for gpx, and is indicated as well by the Z.  the times in the hiketech file
appear in a utc element, so they must be in UTC as well.

this eliminates the usage of QDateTime::toTime_t which is obsolete.

* elimnate remaining uses of obsolete QDateTime::toTime_t

This sounds better than it is, we added uses of gpsbabel::DateTime::toTime_t.
But we control that and can add our own toTime_t.

5 years agoremove unintentional collision with errno. (#636)
tsteven4 [Tue, 25 Aug 2020 20:48:21 +0000 (14:48 -0600)]
remove unintentional collision with errno. (#636)

this caused compiler failures with gnu++1z.

5 years agomore gperf removal (#634)
tsteven4 [Mon, 24 Aug 2020 17:45:42 +0000 (11:45 -0600)]
more gperf removal (#634)

* more gperf removal.

This also makes the xcsv_token table private.

* restore functionality of style file options

and avoid unnecessary enum conversions.

* expicitly pass default value for xcsv_tokens value lookup.

5 years agomerge selected upstream changes for upload.sh (#633)
tsteven4 [Mon, 24 Aug 2020 16:58:30 +0000 (10:58 -0600)]
merge selected upstream changes for upload.sh (#633)

this restores uploads for PRs, but to transfersh.com instead of transfer.sh.

add atrifactory deploy script to upload Qt images.

5 years agoAllow client retry on a redirect of an upgrade check.
Robert Lipe [Mon, 24 Aug 2020 06:30:48 +0000 (01:30 -0500)]
Allow client retry on a redirect of an upgrade check.
Not in this CL, server side change to NOT force an http->https upgrade
on this one URL.

5 years agoMerge branch 'master' of https://github.com/gpsbabel/gpsbabel
Robert Lipe [Mon, 24 Aug 2020 04:37:15 +0000 (23:37 -0500)]
Merge branch 'master' of https://github.com/gpsbabel/gpsbabel

5 years agoRemove dependency on gperf. (#631)
GPSBabel [Mon, 24 Aug 2020 03:15:29 +0000 (22:15 -0500)]
Remove dependency on gperf. (#631)

* Remove dependency on gperf.

There may be more "computer sciency" ways to do this, but let's start here.
Smallest cut possible for removal. Throwing this into CI to plan for actual
removal.

It seems like xcsv_tokens should be more const-able (constexpr?). If necessary,
we can defer this initialization from a global created at startup to being
only inflated when needed. Let's see.

* Bludgeon in temporary better handling for LAT_10E and friends.

* Prepare to die!

* Drop xcsv_tokens.cc and xcsv_tokens.gperf.

* Drop xcsv_tokens.in.

* Remove Steven's shiny new code to run gperf.

Collision with trunk. Oops.

* Pick up xcsv.cc, xcsv.h which were dropped.

5 years agoMigrate some RegExs to QRegularExpression. (#632)
tsteven4 [Sat, 22 Aug 2020 11:56:53 +0000 (05:56 -0600)]
Migrate some RegExs to QRegularExpression. (#632)

QRegExp will be/is deprecated.

5 years agoadd fedora CI build, drop xenial (#630)
tsteven4 [Fri, 14 Aug 2020 22:47:24 +0000 (16:47 -0600)]
add fedora CI build, drop xenial (#630)

* add fedora CI build

* drop travis xenial build.

5 years agocompile in gpsbabel translations and map on non mac unix distribution… (#622)
tsteven4 [Fri, 14 Aug 2020 22:41:03 +0000 (16:41 -0600)]
compile in gpsbabel translations and map on non mac unix distribution… (#622)

* compile in gpsbabel translations and map on non mac unix distributions by default.

This eliminates the need to install gpsbabelfe_*.qm, gpsbabel_*.qm and
gmapbase.html on the system.
Note that the Qt supplied translations must still be installed on the system.
The Qt translations may be in a package like qttranslations5-l10n or
qt5-qttranslations.

* simplify optional resources using std methods.

* discuss dependencies in INSTALL.

5 years agoadd some explicit docbook ids (#629)
tsteven4 [Fri, 14 Aug 2020 19:57:32 +0000 (13:57 -0600)]
add some explicit docbook ids (#629)

this makes the generated html more reproducible as random ids
aren't generated.

5 years agoremove autotools (#626)
tsteven4 [Tue, 11 Aug 2020 18:23:18 +0000 (12:23 -0600)]
remove autotools (#626)

5 years agoadd macos qt 5.15.0 build with artifactory image. (#624)
tsteven4 [Tue, 11 Aug 2020 16:25:33 +0000 (10:25 -0600)]
add macos qt 5.15.0 build with artifactory image. (#624)

5 years agomove linux CI from configure to qmake. (#613)
tsteven4 [Fri, 7 Aug 2020 18:55:09 +0000 (12:55 -0600)]
move linux CI from configure to qmake. (#613)

- Add recipe for internal_styles.cc, xcsv_tokens.gperf, gui, unix-gui, toolinfo to GPSBabel.pro.
- Add support for text substitution in setup.iss and gbversion.h to GPSBabel.pro.
- fix qmake warnings from "qmake -Wall".
- split recipes for documents into scripts.
- shellcheck fixes for fixdoc, mkcapabilities.
- parallel build for coverage.
- add INSTALL file with build instructions.
- sort document targets into ones for general consumption (gpsbabel.html, gpsbabel.pdf) and one to support www.gpsbabel.org (now gpsbabel.org instead of index.html).

5 years agofix i386 regression error with engima. (#620)
tsteven4 [Fri, 7 Aug 2020 17:29:22 +0000 (11:29 -0600)]
fix i386 regression error with engima. (#620)

this was motivated by the test failure seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0

5 years agouse Qt endian detetion. (#619)
tsteven4 [Fri, 7 Aug 2020 13:38:47 +0000 (07:38 -0600)]
use Qt endian detetion. (#619)

This frees us from AC_C_BIGENDIAN which conditionally defined WORDS_BIGENDIAN.
The defintion of WORDS_BIGENDIAN was and is not handled by GPSBabel.pro.

5 years agofix endianness/packing issues with energympro, globalsat_sport. (#618)
tsteven4 [Fri, 7 Aug 2020 13:34:42 +0000 (07:34 -0600)]
fix endianness/packing issues with energympro, globalsat_sport. (#618)

this was motivated by test failures seen at
https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=s390x&ver=1.7.0%2Bds-3&stamp=1594393020&raw=0

5 years agocleanup README.md (#614)
tsteven4 [Tue, 4 Aug 2020 13:46:19 +0000 (07:46 -0600)]
cleanup README.md (#614)

* update travis url to reflect move from .org to .com

* remove duplicate codacy badge and fix markup error.

* add appveyor status badge.

5 years agofix a few gcc10 warnings.
tsteven4 [Sun, 2 Aug 2020 16:06:30 +0000 (10:06 -0600)]
fix a few gcc10 warnings.

5 years agofix lupdate warning. (#617)
tsteven4 [Sun, 2 Aug 2020 15:00:09 +0000 (09:00 -0600)]
fix lupdate warning. (#617)

With Qt 5.12.9 the lupdate command in package_app could print a warning:
/home/strabert/work/pkgconfig/gui/preferences.cc:28: Discarding unconsumed meta data

5 years agoFix NMEA parsing creating Null Island waypoints (#607)
Viet-Tam Luu [Sat, 1 Aug 2020 19:57:22 +0000 (12:57 -0700)]
Fix NMEA parsing creating Null Island waypoints (#607)

* Fix NMEA parsing creating Null Island waypoints

Fix parsing of NMEA GPGGA sentences: ones with 0 "fix quality" (i.e. "invalid") are allowed in serial (i.e. live GPS) mode because (according to the comment) some GPS devices will report previously-read data in the absence of a current good fix. Adjust this allowance to require an actual coordinate value; at least one popular USB GPS device will issue GPGGA such as "$GPGGA,010222.00,,,,,0,00,99.99,,,,,,*65" if it loses a good fix, and the empty lat/lng coordinates (",,,,,") are parsed as 0N 0W (a.k.a. "Null Island"). QString::toDouble() won't report a problem with an empty input so we simply check for 0 lat/lng.

* Use "ok" QString::toDouble() argument instead

... of checking for checking for both lat & lng exactly zero, as `ok` does indeed get set to `false` on empty inputs, in recent Qt versions.

* Revert "Use "ok" QString::toDouble() argument instead"

This reverts commit d226d01c862606615aa599f5d3b649cea12f0700.

5 years agofix error detection for osx script, allow macOS sed for mkstyle. (#615)
tsteven4 [Sat, 1 Aug 2020 14:06:27 +0000 (08:06 -0600)]
fix error detection for osx script, allow macOS sed for mkstyle. (#615)

5 years agosupport doc creation in qmake. (#609)
tsteven4 [Mon, 27 Jul 2020 23:44:14 +0000 (17:44 -0600)]
support doc creation in qmake. (#609)

* support doc creation in qmake.

pass parameters to tools/mkcapabilites instead of
using text replacement in configure.

text replacement in xmldoc/makedoc was unnecessary, directory
creation is handled in the recipee.

there is some foolishness in GPSBabel.pro to allow overriding of
WEB and DOCVERSION on the command line of make.  If those values
are known when running qmake it could be slightly simpler.

* remove dependency on makedoc.in.

* improve fop comments.

* further update fop comments

5 years agosupport parallel vtesto from qmake. (#612)
tsteven4 [Mon, 27 Jul 2020 23:16:33 +0000 (17:16 -0600)]
support parallel vtesto from qmake. (#612)

* support parallel vtesto from qmake.

also support testo, vtesto with out of source builds.

* force check to run.

5 years agosupport third party library configuration in qmake (#611)
tsteven4 [Mon, 27 Jul 2020 21:25:22 +0000 (15:25 -0600)]
support third party library configuration in qmake (#611)

* add qmake options to specify libraries.

* fix no libusb along lines of #610

* correct inclusion of shapelib headers.

* more closely match original includes

instead of trying to use HAVE_*, ENABLED_* *_INHIBITED and
-I options in a consistent manner.

We can revisit this after the demise of configure.

* add qmake message when libusb is disabled.

5 years agoUpdate gpsusbstub.cc (#610)
Vlad Wing [Sat, 25 Jul 2020 12:20:36 +0000 (13:20 +0100)]
Update gpsusbstub.cc (#610)

Build fails when configured `--without-libusb`:
```
jeeps/gpsusbstub.cc:39:3: error: â€˜Fatal’ was not declared in this scope
   Fatal() << no_usb;
   ^~~~~
jeeps/gpsusbstub.cc:39:3: note: suggested alternative: â€˜fatal’
   Fatal() << no_usb;
   ^~~~~
   fatal
```

5 years agofix spelling errors flagged by https://lintian.debian.org/sources/gpsbabel/1.6.0...
tsteven4 [Wed, 8 Jul 2020 21:58:18 +0000 (15:58 -0600)]
fix spelling errors flagged by https://lintian.debian.org/sources/gpsbabel/1.6.0+ds-11.html (#604)

also remove gpsbabel executable that should never have been checked in.

5 years agoReplace xxx with nnn for clarity
Robert Lipe [Mon, 6 Jul 2020 17:15:58 +0000 (12:15 -0500)]
Replace xxx with nnn for clarity

5 years agoRelease candidate (#602)
tsteven4 [Mon, 6 Jul 2020 12:38:58 +0000 (06:38 -0600)]
Release candidate (#602)

* prep for release 1.7.0.

* update reference files for release.

* use windows resource compiler scripts for CLI and GUI.

These rc scripts are used to set the icon the OS sees and to supply
version information that is shown by windows explorer.

* correct file permissions.

* update rc copyright

5 years agoPrevent crash building PDF on MacOS when there's not a missing
Robert Lipe [Fri, 3 Jul 2020 16:37:01 +0000 (11:37 -0500)]
Prevent crash building PDF on MacOS when there's not a missing
SOMETHING to go with this ID tag. We don't seem to need it. Gone.

5 years agoWrite garmin specific ilinks as gpxx:rpt elements (#598)
lintondf [Wed, 1 Jul 2020 00:07:09 +0000 (20:07 -0400)]
Write garmin specific ilinks as gpxx:rpt elements (#598)

* Write garmin specific ilinks as gpxx:rpt elements when garminextensions option is specified

* incorporate code review comments

* comment corrected  to reflect element being closed

5 years agoyum -> apt in Ubuntu instructions (#599)
Markus Wamser [Fri, 26 Jun 2020 14:25:41 +0000 (16:25 +0200)]
yum -> apt in Ubuntu instructions (#599)

5 years agoupdate macos, linux builds to use Qt 5.12.9 (#596)
tsteven4 [Thu, 18 Jun 2020 00:29:45 +0000 (18:29 -0600)]
update macos, linux builds to use Qt 5.12.9 (#596)

* switch macos to Qt 5.12.9

* rebuild docker images

5 years agoAdjust gdb reader duration handling (#595)
tsteven4 [Wed, 10 Jun 2020 11:20:08 +0000 (05:20 -0600)]
Adjust gdb reader duration handling (#595)

* experiment with filtering gdb waypoints.

* formalize new gdb option to avoid creation of waypoints
from non-user points.

Also, don't fill in the description when processing durations.  This
interacted undesirably with the roadbook option.

* fix reference files.

* simplify bool option processing in gdb, new ref files.

* fix reference files again.

* contrast the gdb dropwpt option with the via option

5 years agoclean up some cppcheck warnings in gdb. (#594)
tsteven4 [Mon, 8 Jun 2020 07:16:48 +0000 (01:16 -0600)]
clean up some cppcheck warnings in gdb. (#594)

5 years agoExtract expected travel durations from Garmin BaseCamp GDB output (#585)
lintondf [Sun, 7 Jun 2020 22:19:10 +0000 (18:19 -0400)]
Extract expected travel durations from Garmin BaseCamp GDB output (#585)

* extract track segment expected travel durations from Garmin BaseCamp autorouted GDB exports and report as <rtept/src> elements in gpx output

* revised to use Garmin Format-Specific Data object to store durations

* generate at frozen test time

* include code review suggestions

* store Garmin BaseCamp autoroute waypoint travel durations in the <desc> elements of <rtept> waypoints; modify gpx ouptut to exclude autoroute generated rtept waypoints from initial waypoint list

* remove waypoint class lookup and replace tabs with spaces

* run astyle on gdb.cc

* turn off detailed GDB debugging

Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
5 years agofix Uncaught TypeError: map.checkResize is not a function (#593)
tsteven4 [Sun, 7 Jun 2020 16:56:18 +0000 (10:56 -0600)]
fix Uncaught TypeError: map.checkResize is not a function (#593)

* fix Uncaught TypeError: map.checkResize is not a function

with GUI map preview.

* remove extra newline from map preview javascript.

* tighten up js generation.

* tighten up js some more.

* tweak js generation.

5 years agofix segmentation fault in GUI map preview. (#592)
tsteven4 [Sat, 6 Jun 2020 16:44:04 +0000 (10:44 -0600)]
fix segmentation fault in GUI map preview. (#592)

5 years agorefactor logging (#582)
tsteven4 [Fri, 5 Jun 2020 19:21:34 +0000 (13:21 -0600)]
refactor logging (#582)

* refactor logging to

allow the noreturn attribute on fatal() to be used by analysis
tools while still generating messages with an output stream.

* Add our own message handler.

This allows us to use stderr on windows.  The default message handler
routes QDebug messages to the debugger on windows.

* flush stdout before message logger writes to stderr.

* flush stdout before writing to standard error for fatal().

or else messages can appear in the wrong order on Windows.

5 years agoRemove Mapsource .mps format (#588)
GPSBabel [Thu, 4 Jun 2020 07:46:11 +0000 (02:46 -0500)]
Remove Mapsource .mps format (#588)

* Fix numerous instances of shadowing confusion.

Inspired by a cppcon talk and our recent conversations about warnings, I
took a closer look at shadowing variables in our code and I wasn't proud
of my findings.

We had a lot of code that was writing to local variables or function
arguments when it thought it was operating on globals or (soon)
method-member variables. I made a rather half-hearted pass at changing
this by splitting up huge functions, renaming arguments, renaming globals
to reflect their future status as method variables (foo_), and generally
cleaning things up. The amound of effort I spent on each format was
approximately equal to its expected lifespan - I'm not spending an hour
on cleanups on formats I should instead be deleting.

In a future submit, I'll try to find some combination of -W flags on
our targets that allows us to not regress easily.

* Fix merge conflict I just created in gdb.cc

* Delete workspace.xml

* Delete the same link in garmin_icons.xml that I deleted twice yesterday.
Fix more esoteric warnings.

* Reapply MORE of yesterday's commits.
Seriously, I know this has been committed and is in HEAD...

* Attempt to fix list detachment within route.cc

* Remove Mapsource

The Mapsource format has been deprecated by Garmin for something
like 15 years. Later versions of Mapsource used GDB and Basecamp,
Garmin's first replacement for the Mapsource lineage, was used
exclusively in later versions.

I've reviewed list traffic and floated a discussion on the list.
The code style was never really very flexible and it it bears
a high maintenance cost that we can no longer afford. This
format is dead.

* Remove more pieces of Mapsource.

* Change Netstumbler test to not use Mapsource for staging.
More cleanups.

* Fix netstumbler so I can delete Mapsource. Ugh.

* Update netstumbler with IWYU.

5 years agouse http for upgrade (#587)
tsteven4 [Wed, 3 Jun 2020 11:11:04 +0000 (05:11 -0600)]
use http for upgrade (#587)

* test "TLS initialization failed" issue on windows.

* https ok with desktop services.

5 years agofix Qt 5.15.0 Wdeprecated-declarations warnings for (#584)
tsteven4 [Mon, 1 Jun 2020 20:50:26 +0000 (14:50 -0600)]
fix Qt 5.15.0 Wdeprecated-declarations warnings for (#584)

QXmlDefaultHandler
QXmlInputSource
QXmlSimpleReader

as suggested use QXmlStreamReader instead.

5 years agoconvert osm to format class (#579)
tsteven4 [Mon, 1 Jun 2020 20:49:29 +0000 (14:49 -0600)]
convert osm to format class (#579)

* convert osm to Format class.

* use static function cb w/o lambdas.

5 years agoclean up mkstyle.sh (#578)
tsteven4 [Mon, 1 Jun 2020 18:55:10 +0000 (12:55 -0600)]
clean up mkstyle.sh (#578)

as suggested by shellcheck used $() instead of backticks,
and double quote to prevent globbing and word splitting.
mkstyle.sh now works if the directory path contains a space.

drop the failed attempt to exclude custom.style. This resolves #577
drop the exclusion of README.style, which hasn't existed for a long time.

use basename to drop the suffix instead of piping to sed.

5 years agofix Qt 5.15.0 Wdeprecated-declarations warnings for (#583)
tsteven4 [Mon, 1 Jun 2020 11:26:31 +0000 (05:26 -0600)]
fix Qt 5.15.0 Wdeprecated-declarations warnings for (#583)

QTime::start()
QTime::elapsed()

5 years agomake garmin_tables const (#576)
tsteven4 [Mon, 1 Jun 2020 11:18:49 +0000 (05:18 -0600)]
make garmin_tables const (#576)

and clean up mkicondoc cppcheck errors.

5 years agoMerge pull request #574 from tsteven4/guict
tsteven4 [Thu, 28 May 2020 14:22:47 +0000 (08:22 -0600)]
Merge pull request #574 from tsteven4/guict

clang-tidy fixes for GUI

5 years agoclang-tidy readability-isolate-declaration on gui.
tsteven4 [Wed, 27 May 2020 20:37:09 +0000 (14:37 -0600)]
clang-tidy readability-isolate-declaration on gui.

5 years agoclang tidy modernize-use-auto on gui.
tsteven4 [Wed, 27 May 2020 20:31:23 +0000 (14:31 -0600)]
clang tidy modernize-use-auto on gui.

5 years agoclang tidy modernize-redundant-void-arg on gui.
tsteven4 [Wed, 27 May 2020 20:27:20 +0000 (14:27 -0600)]
clang tidy modernize-redundant-void-arg on gui.

5 years agoclang-tidy readability-redundant-member-init on gui.
tsteven4 [Wed, 27 May 2020 19:48:15 +0000 (13:48 -0600)]
clang-tidy readability-redundant-member-init on gui.

5 years ago Fix numerous instances of shadowing confusion. (#570)
GPSBabel [Wed, 27 May 2020 03:31:16 +0000 (22:31 -0500)]
Fix numerous instances of shadowing confusion. (#570)

Fix numerous instances of shadowing confusion.

Inspired by a cppcon talk and our recent conversations about warnings, I
took a closer look at shadowing variables in our code and I wasn't proud
of my findings.

We had a lot of code that was writing to local variables or function
arguments when it thought it was operating on globals or (soon)
method-member variables. I made a rather half-hearted pass at changing
this by splitting up huge functions, renaming arguments, renaming globals
to reflect their future status as method variables (foo_), and generally
cleaning things up. The amound of effort I spent on each format was
approximately equal to its expected lifespan - I'm not spending an hour
on cleanups on formats I should instead be deleting.

In a future submit, I'll try to find some combination of -W flags on
our targets that allows us to not regress easily.

5 years agoFail configuration if libusb-1.0 is not found (#564)
tsteven4 [Mon, 25 May 2020 17:52:58 +0000 (11:52 -0600)]
Fail configuration if libusb-1.0 is not found (#564)

* have configure fail if libusb is enabled and not found.

* correct indentation in configure.

5 years agoUse strncmp to compare array to string (#545)
Jochen Sprickerhof [Mon, 25 May 2020 15:08:13 +0000 (17:08 +0200)]
Use strncmp to compare array to string (#545)

5 years agofix -Wsizeof-pointer-memaccess in garmin_gpi reader. (#569)
tsteven4 [Mon, 25 May 2020 11:55:37 +0000 (05:55 -0600)]
fix -Wsizeof-pointer-memaccess in garmin_gpi reader. (#569)

again, this really wasn't a problem.  The destination and the
source had the same size.  But we can do better.

5 years agoMerge pull request #567 from gpsbabel/bye_psitrex
GPSBabel [Mon, 25 May 2020 07:51:01 +0000 (02:51 -0500)]
Merge pull request #567 from gpsbabel/bye_psitrex

Remove PSITrex, which has been unused for many years.

5 years agoMerge branch 'bye_psitrex' of https://github.com/gpsbabel/gpsbabel into bye_psitrex
Robert Lipe [Mon, 25 May 2020 04:09:25 +0000 (23:09 -0500)]
Merge branch 'bye_psitrex' of https://github.com/gpsbabel/gpsbabel into bye_psitrex

5 years agoDon't refer to PSITtext in reference files.
Robert Lipe [Mon, 25 May 2020 03:42:29 +0000 (22:42 -0500)]
Don't refer to PSITtext in reference files.

5 years agoMore remnants of PSITrex.
Robert Lipe [Mon, 25 May 2020 03:40:55 +0000 (22:40 -0500)]
More remnants of PSITrex.

5 years agoGarmin_icons in doc can't refer to psitrex any longer.
Robert Lipe [Mon, 25 May 2020 03:38:11 +0000 (22:38 -0500)]
Garmin_icons in doc can't refer to psitrex any longer.

5 years agoCleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:34:35 +0000 (22:34 -0500)]
Cleanup of PSITrex removal

5 years agoCleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:34:16 +0000 (22:34 -0500)]
Cleanup of PSITrex removal

5 years agoCleanup of PSITrex removal
GPSBabel [Mon, 25 May 2020 03:33:46 +0000 (22:33 -0500)]
Cleanup of PSITrex removal

5 years agoActually prepare PSITrex deletion for cleanup
GPSBabel [Mon, 25 May 2020 03:31:53 +0000 (22:31 -0500)]
Actually prepare PSITrex deletion for cleanup

5 years agofix -Wstringop-truncation warning in osm. (#568)
tsteven4 [Mon, 25 May 2020 01:31:08 +0000 (19:31 -0600)]
fix -Wstringop-truncation warning in osm. (#568)